package com.vcms.cms.entity;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

/**
 * ContentAttr entity. @author MyEclipse Persistence Tools
 */
@Entity
@Table(name = "content_attr", catalog = "vcms_0.1")
public class ContentAttr implements java.io.Serializable {

	// Fields

	private Integer contentAttrId;
	private Content content;
	private String attrName;
	private String attrValue;

	// Constructors

	/** default constructor */
	public ContentAttr() {
	}

	/** full constructor */
	public ContentAttr(Content content, String attrName, String attrValue) {
		this.content = content;
		this.attrName = attrName;
		this.attrValue = attrValue;
	}

	// Property accessors
	@Id
	@GeneratedValue
	@Column(name = "contentAttrId", unique = true, nullable = false)
	public Integer getContentAttrId() {
		return this.contentAttrId;
	}

	public void setContentAttrId(Integer contentAttrId) {
		this.contentAttrId = contentAttrId;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "contentId")
	public Content getContent() {
		return this.content;
	}

	public void setContent(Content content) {
		this.content = content;
	}

	@Column(name = "attrName", length = 100)
	public String getAttrName() {
		return this.attrName;
	}

	public void setAttrName(String attrName) {
		this.attrName = attrName;
	}

	@Column(name = "attrValue", length = 100)
	public String getAttrValue() {
		return this.attrValue;
	}

	public void setAttrValue(String attrValue) {
		this.attrValue = attrValue;
	}

}